#ifndef _MESSAGING_H_
#define _MESSAGING_H_

/// <summary>
/// Message
/// </summary>
typedef struct _Message
{
	long pid;
	long mid;
	long param1;
	long param2;
	long param3;
	long param4;
	long param5;
	long param6;
	long result;

} Message, *MessagePtr;

/// <summary>
/// Macros
/// </summary>
#define MSG_SIZE 32
#define MESSAGE_HANDLER(name) \
	int MSG_##name(MessagePtr msg) 

/// <summary>
/// Messages
/// </summary>
MESSAGE_HANDLER(ShowWindow);
MESSAGE_HANDLER(HideWindow);
MESSAGE_HANDLER(MoveWindow);
MESSAGE_HANDLER(DestroyWindow);

/// <summary>
/// Message Pipeline
/// </summary>
extern int MGSStart(void);
extern int MGSCreate(void);
extern int MSGDispatch(MessagePtr msg);
extern int MGSStop(void);
extern void* MGSRunning(void* ptr);
typedef int(*MSGInvoke)(MessagePtr msg);

#endif